package com.ciaj.base.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author: ciaj.
 * @Date: 2020/8/8 16:04
 * @Description: PO基类
 * @version: 1.0
 */
@Data
public class SupperEntity<ID extends Serializable> implements Serializable {
    /**
     * UUID
     */
    @TableId(type = IdType.UUID)
    @TableField("id")
    private ID id;

    /**
     * 记录创建人标识，记录用户的UUID
     */
    @TableField(value = "create_by",fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 记录创建日期
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 记录最后更新人标识，记录用户的UUID
     */
    @TableField(value = "update_by",fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    /**
     * 记录最后更新日期
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    /**
     * 删除标识0/1
     */
    @TableLogic
    @TableField(value ="del")
    private Integer del;
    /**
     * 删除标识
     */
    @Version
    @TableField(value ="version")
    private Integer version;
    /**
     * 删除标识
     */
    @TableField(value = "com_id",fill = FieldFill.INSERT)
    private String comId;

    /**
     * 删除标识
     */
    @TableField(value = "last_modify")
    private LocalDateTime lastModify;

}